package com.zhuss.core.db.dao.ext;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.zhuss.bean.bo.core.permission.DeletePermissionResourceBo;
import com.zhuss.core.db.dao.gen.PermissionResourceMapper;
import com.zhuss.core.db.entity.PermissionResource;

@Mapper
public interface PermissionResourceDao extends PermissionResourceMapper {

	List<PermissionResource> listResource(@Param("permissionIdList") List<Long> permissionIdList);
	
	List<Long> listResourceId(@Param("permissionIdList") List<Long> permissionIdList);
	
	List<PermissionResource> listResourceByType(@Param("permissionIdList") List<Long> permissionIdList, @Param("type") Integer type);

	List<PermissionResource> listPermission(@Param("resourceId") Long resourceId);
	
	void create(PermissionResource record);

	void deleteByPermissionResource(@Param("bo") DeletePermissionResourceBo bo, @Param("permissionId") Long permissionId, @Param("resourceIdList") List<Long> resourceIdList);

	void deleteByPermissionResourceByType(@Param("bo") DeletePermissionResourceBo bo, @Param("permissionId") Long permissionId, @Param("resourceIdList") List<Long> resourceIdList, @Param("type") Integer type);
	
	void deleteByResourcePermission(@Param("bo") DeletePermissionResourceBo bo, @Param("resourceId") Long resourceId, @Param("permissionIdList") List<Long> permissionIdList);
    
}